]> dgit.raspbian.org Git - gnome-shell.git/commit
screenshot: Fix stripping suffix from relative filename
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Jan 2020 18:26:05 +0000 (19:26 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Jan 2020 18:31:04 +0000 (19:31 +0100)
commit4c6a0678fff5118880101211c84214fde61e9cb6
treea0fd3f5762e1dbc8e489bcdf06ab9b5d5b4dc978
parenta8dcfa4656e01764380d081d74365092f08c114e
screenshot: Fix stripping suffix from relative filename

String.prototype.substr() doesn't support a negative length value
(to subtract from the full length), so we end up with a filename
of '' when hitting that code paths (a relative filename with '.png'
suffix).

Fix this by switching to String.prototype.replace() instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2091
js/ui/screenshot.js